package com.cat.dataStructure03;

import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/find-consecutive-integers-from-a-data-stream/
 * @create 2025/11/7 21:12
 * @since JDK17
 */

public class DataStream {
    int cnt, val, k;
    public DataStream(int value, int k) {
        val = value;
        this.k = k;
    }

    public boolean consec(int num) {
        if (num == val) {
            cnt++;
        } else {
            cnt = 0;
        }
        return cnt >= k;
    }
}